﻿using System;
using System.Linq;

public static class DivisibleNumbers
{
    static void Main(string[] args)
    {
        int[] intArray = new int[] { 1, 3, 21, 7, 34, 2, 12 };
        var newArray = intArray.Where(x => x % 7 == 0 || x % 3 == 0);
        foreach (var item in newArray)
        {
            Console.WriteLine(item);
        }
        var newArrayFromLINQ = from num in intArray
                               where num % 7 == 0 || num % 3 == 0
                               select num;
        foreach (var item in newArrayFromLINQ)
        {
            Console.WriteLine(item);
        }
    }
}

